<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    
    <title>post | conci</title>
    <meta name="description" content="叨的叨叨以叨叨，那是什么叨该说啥呢。。。博客不是第一次写，但在自己搭建的博客上写文章的确是第一次。十分兴奋。看着自己辛苦搭建出来的博客，一点一点达到自己心目中的样子，这种感觉只有做过的人才可以体会到。如果你还在犹豫，那就别墨迹了。废话不多说。搭建自己的博客，当时我查的时候好多人推荐用Wordpress，既然这么多人推荐，那我就不用，怎么滴。好吧被看穿了，其实是我太穷了，没钱租服务器。虽然好像也可以">
<meta name="keywords" content="hexo">
<meta property="og:type" content="article">
<meta property="og:title" content="hexo个人博客搭建">
<meta property="og:url" content="http://www.ccblog.win/2017/03/12/hexo个人博客搭建/index.html">
<meta property="og:site_name" content="cc">
<meta property="og:description" content="叨的叨叨以叨叨，那是什么叨该说啥呢。。。博客不是第一次写，但在自己搭建的博客上写文章的确是第一次。十分兴奋。看着自己辛苦搭建出来的博客，一点一点达到自己心目中的样子，这种感觉只有做过的人才可以体会到。如果你还在犹豫，那就别墨迹了。废话不多说。搭建自己的博客，当时我查的时候好多人推荐用Wordpress，既然这么多人推荐，那我就不用，怎么滴。好吧被看穿了，其实是我太穷了，没钱租服务器。虽然好像也可以">
<meta property="og:image" content="http://ooa3lxrpg.bkt.clouddn.com/%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_20170417212627.png">
<meta property="og:image" content="http://ooa3lxrpg.bkt.clouddn.com/%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_20170417212833.png">
<meta property="og:image" content="http://ooa3lxrpg.bkt.clouddn.com/%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_20170417214638.png">
<meta property="og:image" content="http://ooa3lxrpg.bkt.clouddn.com/%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_20170417214722.jpg">
<meta property="og:image" content="http://ooa3lxrpg.bkt.clouddn.com/%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_20170417215217.png">
<meta property="og:updated_time" content="2017-06-01T05:22:12.008Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="hexo个人博客搭建">
<meta name="twitter:description" content="叨的叨叨以叨叨，那是什么叨该说啥呢。。。博客不是第一次写，但在自己搭建的博客上写文章的确是第一次。十分兴奋。看着自己辛苦搭建出来的博客，一点一点达到自己心目中的样子，这种感觉只有做过的人才可以体会到。如果你还在犹豫，那就别墨迹了。废话不多说。搭建自己的博客，当时我查的时候好多人推荐用Wordpress，既然这么多人推荐，那我就不用，怎么滴。好吧被看穿了，其实是我太穷了，没钱租服务器。虽然好像也可以">
<meta name="twitter:image" content="http://ooa3lxrpg.bkt.clouddn.com/%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_20170417212627.png">
    
        <link rel="alternate" href="true" title="cc" type="application/atom+xml">
    
    
        <link rel="icon" href="/favicon.ico">
    
    <link rel="stylesheet" href="/css/concise.css">
    <script src="/js/concise.js"></script>
    <script>
        (function(){
            var useragent=navigator.userAgent;
            console.log(navigator,useragent);
            var isM;
            if(useragent.indexOf('iPhone')!=-1){
                isM=true;
            }else if(useragent.indexOf('Android ')!=-1){
                isM=true;
            }else if(useragent.indexOf('iPad')!=-1){
                isM=true;
            }else{
                isM=false;
            }
            if(isM){
                document.documentElement.style.fontSize=document.documentElement.clientWidth/375*100+'px';
                window.onresize=function(){
                    document.documentElement.style.fontSize=document.documentElement.clientWidth/375*100+'px';
                };
            }
        })();
    </script>
    
        <script type="text/javascript" id="hexo.configuration">
            var CONFIG = {
                root: '/',
                algolia: {
                    applicationID: '148WKKLBJ2',
                    apiKey: '1b27867f0ba7ad358543a84d6d30bcb3',
                    indexName: 'test',
                    hits: {
                        per_page: ''
                    },
                    labels: {
                        input_placeholder: '请输入要搜索的字段...',
                        hits_empty: '没有查找到和 「${query}」相关的内容',
                        hits_stats: '总共${hits} 条相关条目，使用了 ${time} 毫秒'
                    }
                }
            };
        </script>
    
    <script src="http://opu30aljn.bkt.clouddn.com/jquery.js"></script>
    
        <script src="http://opu30aljn.bkt.clouddn.com/instantsearch.js"></script>
        <script src="/js/thirdparty/algolia.js"></script>
    
    <script src="/js/script.js"></script>
</head>
<body>
<input type="checkbox" id="left-information">
<div id="wrapper">
    <div id="bgg"></div>
    <header id="header">
    <nav id="nav" class="clearfix">
        <label for="left-information"></label>
        <ul class='nav-left'>
            <li><a href="/">ccblog</a></li>
        </ul>
        <input type="checkbox" id="header-right-nav">
        <ul class="clearfix nav-right">
            
            <li><a href="/">Home</a></li>
            
            <li><a href="/about">About</a></li>
            
            <li><a href="/contact">Contact</a></li>
            
            <li><a href="/archives">Archives</a></li>
            
            <li><a href="/tags">tags</a></li>
            
        </ul>
        <label for="header-right-nav"><i></i></label>
    </nav>
</header>
    <article id="logo">
    <div id="logo-content">
        <header>
            <a href="">cc&#39;s .blog<b>conci</b></a>
        </header>
        <p>
            conci theme 1.0.0<br>
            Simple and practical hexo personal blog theme.<br>
            The freedom to choose
        </p>
    </div>
</article>
    <div id="main" class="clearfix">
        <section id="main-left" class="left">
            <article id="post">
    <h1>hexo个人博客搭建</h1>
    <p>
        
            <span class="visitors">visitors
                <span id="/2017/03/12/hexo个人博客搭建/" class="leancloud_visitors" data-flag-title="hexo个人博客搭建">
                    <span class="leancloud-visitors-count">0</span>
                </span>
            </span>&nbsp;&nbsp;•&nbsp;&nbsp;
        
        
            <span class="tag">
                  <a class="article-category-link" href="/categories/hexo博客搭建/">hexo博客搭建</a>
            </span>&nbsp;&nbsp;•&nbsp;&nbsp;
        
        <span class="date">2017.03.12</span>
    </p>
    <div id="page-post-content">
        <h3 id="叨的叨叨以叨叨，那是什么叨"><a href="#叨的叨叨以叨叨，那是什么叨" class="headerlink" title="叨的叨叨以叨叨，那是什么叨"></a>叨的叨叨以叨叨，那是什么叨</h3><p>该说啥呢。。。博客不是第一次写，但在自己搭建的博客上写文章的确是第一次。十分兴奋。看着自己辛苦搭建出来的博客，一点一点达到自己心目中的样子，这种感觉只有做过的人才可以体会到。如果你还在犹豫，那就别墨迹了。废话不多说。<br>搭建自己的博客，当时我查的时候好多人推荐用Wordpress，既然这么多人推荐，那我就不用，怎么滴。好吧被看穿了，其实是我太穷了，没钱租服务器。虽然好像也可以免费做出来，这个不太清楚，因为没太了解。就在我茶不思饭不想的时候，我发现了Hexo，这个真是太符合我了。利用github来部署静态博客，谁叫咱们就是干前端的呢。啥也不说了，立马开干。 </p>
<h3 id="适合人群"><a href="#适合人群" class="headerlink" title="适合人群"></a>适合人群</h3><p>哈哈你来看这篇文章说明你就适合<br>使用windows的你们（其他系统差不多）</p>
<h3 id="安装必要程序"><a href="#安装必要程序" class="headerlink" title="安装必要程序"></a>安装必要程序</h3><h4 id="安装GIT"><a href="#安装GIT" class="headerlink" title="安装GIT"></a>安装GIT</h4><p>到<a href="https://git-for-windows.github.io/" target="_blank" rel="external"> msysgit</a>下载好后， 下一步下一步执行安装即可。<br>什么，下载太慢了，我含泪告诉你人这一生不翻几次墙是干不了大事的。</p>
<h4 id="安装Node-js"><a href="#安装Node-js" class="headerlink" title="安装Node.js"></a>安装Node.js</h4><p>到<a href="https://nodejs.org/en/" target="_blank" rel="external">Node.js</a>下载，左边稳定版，右边最新版，根据需要下载。推荐稳定版。安装的话，下一步还得下一步 非常简单。</p>
<h4 id="安装Hexo（我才是主人翁）"><a href="#安装Hexo（我才是主人翁）" class="headerlink" title="安装Hexo（我才是主人翁）"></a>安装Hexo（我才是主人翁）</h4><p>终于到我隆重出场了，鼠标右键任意位置，选择Git bash Here，输入npm 命令即可安装。<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ npm install hexo -g</div></pre></td></tr></table></figure></p>
<p>好吧，我叫特简单。文件一般会安装到C:\Users\Administrator\AppData\Roaming\npm\node_modules下可通过下边npm命令具体查看：<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ npm root -g</div></pre></td></tr></table></figure></p>
<p>安装好了就可以随便找个你喜欢的位置建个名叫hexo的文件夹，在这个文件夹里右键选择Git bash Here，分别输入hexo init和npm install（初始化文件和安装依赖包）：<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ hexo init</div></pre></td></tr></table></figure></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ npm install</div></pre></td></tr></table></figure>
<p>好了你应该已经看见效果了。接下来我们就要在网页中查看了，本地预览。分别输入g和s（生成静态网页和本地预览）：<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ hexo g</div></pre></td></tr></table></figure></p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ hexo s</div></pre></td></tr></table></figure>
<p>上面的g和s其实generate和server的缩写，但是写缩写就够了，效果一样。如果出现<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line">$ hexo s</div><div class="line">INFO  Start processing</div><div class="line">INFO  Hexo is running at http://localhost:4000/. Press Ctrl+C to stop.</div></pre></td></tr></table></figure></p>
<p>哈哈你成功了，下一步在网页中打开localhost:4000就可以看到网页了，兴奋兴奋呀。现在本地已经OK了。下来我们要把它发布到网上让世界人民来观摩。</p>
<h3 id="注册github来部署博客"><a href="#注册github来部署博客" class="headerlink" title="注册github来部署博客"></a>注册github来部署博客</h3><h4 id="注册github"><a href="#注册github" class="headerlink" title="注册github"></a>注册<a href="https://github.com/" target="_blank" rel="external">github</a></h4><p>github应该很多人已经注册或正在注册的路上。我就不多说啥了。</p>
<h4 id="创建页面仓库"><a href="#创建页面仓库" class="headerlink" title="创建页面仓库"></a>创建页面仓库</h4><p><img src="http://ooa3lxrpg.bkt.clouddn.com/%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_20170417212627.png" alt="Alt text"><br>选择New repository<br><img src="http://ooa3lxrpg.bkt.clouddn.com/%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_20170417212833.png" alt="Alt text"><br>Repositoryname输入：你的账号名字.github.io，如（cspp01.github.io）。Description输入描述，最下面的选框Initialize this repository with a README可选可不选，建议选上。点击Create。好了，你在网上存放博客的地方也见好了。</p>
<h4 id="SSH密钥"><a href="#SSH密钥" class="headerlink" title="SSH密钥"></a>SSH密钥</h4><h5 id="生成SSH密钥"><a href="#生成SSH密钥" class="headerlink" title="生成SSH密钥"></a>生成SSH密钥</h5><p>还是右键点击Git base Here输入<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">ssh-keygen -t rsa -C <span class="string">"你的邮箱地址"</span></div></pre></td></tr></table></figure></p>
<p>按回车，按回车，按回车，你得按3边，成功，到C:\Users\Administrator.ssh下，可以看到两个文件，id_rsa是密钥 ，id_rsa.pub是公钥。</p>
<h5 id="建立连接"><a href="#建立连接" class="headerlink" title="建立连接"></a>建立连接</h5><p>回到github选择setting-&gt;SSH and GPG keys-&gt;右上角New SSH key<br><img src="http://ooa3lxrpg.bkt.clouddn.com/%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_20170417214638.png" alt="Alt text"><br><img src="http://ooa3lxrpg.bkt.clouddn.com/%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_20170417214722.jpg" alt="Alt text"><br><img src="http://ooa3lxrpg.bkt.clouddn.com/%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_20170417215217.png" alt="Alt text"><br>title随便了，最好有意义点。打开刚才的id_rsa.pub，Ctrl+a-&gt;Ctrl+c，粘贴到key，Add SSH key，OK。</p>
<h3 id="全局配置"><a href="#全局配置" class="headerlink" title="全局配置"></a>全局配置</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">git config --global user.name <span class="string">"你的github用户名"</span></div><div class="line">git config --global user.email  <span class="string">"你的邮箱"</span></div></pre></td></tr></table></figure>
<h3 id="hexo"><a href="#hexo" class="headerlink" title="hexo"></a>hexo</h3><h4 id="config-yml配置文件"><a href="#config-yml配置文件" class="headerlink" title="_config.yml配置文件"></a>_config.yml配置文件</h4><p>这个文件在hexo根目录下，打开_config.yml配置文件，找到下面（在最下面）修改为：<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div></pre></td><td class="code"><pre><div class="line">deploy:</div><div class="line">  <span class="built_in">type</span>: git</div><div class="line">  repo: 仓库地址</div><div class="line">  branch: master</div></pre></td></tr></table></figure></p>
<p>注意repo是你刚才新建的仓库的地址,复制粘贴上去就好OK了。还有注意冒号后面的空格必须。</p>
<h4 id="hexo部署"><a href="#hexo部署" class="headerlink" title="hexo部署"></a>hexo部署</h4><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ hexo g</div></pre></td></tr></table></figure>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ hexo d</div></pre></td></tr></table></figure>
<p>最后出现<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">INFO  Deploy <span class="keyword">done</span>: git</div></pre></td></tr></table></figure></p>
<p>说明成功<br>如果在执行 hexo d 后,出现的错误<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">error deployer not found:git</div></pre></td></tr></table></figure></p>
<p>请再次输入<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">npm install hexo-deployer-git --save</div></pre></td></tr></table></figure></p>
<p>然后再次执行<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">$ hexo g</div><div class="line">$ hexo d</div></pre></td></tr></table></figure></p>
<p>应该就可以了，如果还失败。请重新安装hexo重新部署。我第一次就是不管怎么样操作都部署失败，后来重新安装了一下就好了。就是这么神奇。<br>最后在浏览器输入你刚才新建仓库的名字：你的用户名.github.io（如cspp01.github.io）就可以访问了。<br>是不是很酷。</p>
<h3 id="写博客"><a href="#写博客" class="headerlink" title="写博客"></a>写博客</h3><p>你的博客文章都放在 source \ _posts 下，你如果要写新博客文章的话，可以手动在这个文件夹下创建.md文件。也可以通过命令创建：<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ hexo new <span class="string">"你的文章名字"</span></div></pre></td></tr></table></figure></p>
<p>然后再在你建好的.md文件里编辑文章。文章运用的是Markdowm（Markdown 是一种用来写作的轻量级「标记语言」）,还是很简单很好用的，其实你仿照hello world的那篇文章来写就可以。</p>
<h4 id="文章中加图片"><a href="#文章中加图片" class="headerlink" title="文章中加图片"></a>文章中加图片</h4><p>加图片可以先把图片上传到云端，推荐<a href="href=&quot;https://www.qiniu.com/&quot;">七牛</a>，然后在文章中加入了。<br>建好，编辑完，先在本地调试预览，在通过命令上传：<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div></pre></td><td class="code"><pre><div class="line">$ hexo clean</div><div class="line">$ hexo g</div><div class="line">$ hexo s --debug</div><div class="line">$ hexo d</div></pre></td></tr></table></figure></p>
<p>好了，现在你新写的文章也上传上去了。上传上去立马刷新可能还不会作用到是因为会有一丝丝延迟，再刷新下就会好了。本地调试好后要上传记得每次都（每次上传最好先claer）：<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line">$ hexo clean</div><div class="line">$ hexo g</div><div class="line">$ hexo d</div></pre></td></tr></table></figure></p>
<h3 id="hexo常用命令"><a href="#hexo常用命令" class="headerlink" title="hexo常用命令"></a>hexo常用命令</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div></pre></td><td class="code"><pre><div class="line">hexo 安装</div><div class="line">$ hexo install hexo -g(安装hexo)</div><div class="line">$ hexo init(初始化)</div><div class="line">$ npm install(安装依赖包)</div><div class="line"></div><div class="line">服务器</div><div class="line">$ hexo s(开启本地服务，本地预览)</div><div class="line">$ hexo s --debug(以调试模式启动，对文件的更改无需停止网站只需刷新即可看到效果)</div><div class="line">$ hexo s -p 5000(更改端口)</div><div class="line"></div><div class="line">$ hexo clean(清除缓存)</div><div class="line">$ hexo d(上传部署)</div><div class="line"></div><div class="line">本地文件</div><div class="line">$ hexo g(重新生成本地文件)</div><div class="line"></div><div class="line">编辑文章</div><div class="line">$ hexo new <span class="string">"page"</span> (新建文章)</div></pre></td></tr></table></figure>
<p>这篇就到这里，下篇我们介绍怎么设置主题，和一些样式的修改自定义。</p>

    </div>
    
        <div id="page-post-tags">
              <a class="article-tag-link" href="/tags/hexo/">hexo</a>
        </div>
    
    
        <div id="page-post-reward">
            <label for="page-post-inp">打赏</label>
            <input type="checkbox" id="page-post-inp">
            <ul class="clearfix">
                <li>
                    <a href="javascript:void(0);">
                        <img src="http://ooa3lxrpg.bkt.clouddn.com/wx.jpg?imageView2/2/w/180">
                    </a>
                    <p>微信</p>
                </li>
                <li>
                    <a href="javascript:void(0);">
                        <img src="http://ooa3lxrpg.bkt.clouddn.com/zfb.jpg?imageView2/2/w/180">
                    </a>
                    <p>支付宝</p>
                </li>
            </ul>
        </div>
    
    
<nav id="article-nav" class="clearfix">
  
    <a href="/2017/03/01/hello-world/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">上一篇</strong>
      <div class="article-nav-title">
        
          
          Hello World
        
      </div>
    </a>
  
  
    <a href="/2017/03/14/hexo主题配置和修改样式/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">下一篇</strong>
      <div class="article-nav-title">
          
          
          hexo的next主题配置和优化
          
      </div>
    </a>
  
</nav>

</article>


<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"slide":{"type":"slide","bdImg":"4","bdPos":"left","bdTop":"100"},"image":{"viewList":["qzone","tsina","tqq","renren","weixin"],"viewText":"分享到：","viewSize":"32"},"selectShare":{"bdContainerClass":null,"bdSelectMiniList":["qzone","tsina","tqq","renren","weixin"]}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>



<div id="cloud-tie-wrapper" class="cloud-tie-wrapper"></div>
<script src="https://img1.cache.netease.com/f2e/tie/yun/sdk/loader.js"></script>
<script>
    var cloudTieConfig = {
        url: document.location.href,
        sourceId: '',
        productKey: '6f0492a87f74476e9df370e5e7ce2270',
        target: 'cloud-tie-wrapper'
    };
    var yunManualLoad = true;
    Tie.loader('aHR0cHM6Ly9hcGkuZ2VudGllLjE2My5jb20vcGMvbGl2ZXNjcmlwdC5odG1s', true);
</script>



        </section>
        <section id="main-right" class="right">
            <div class="my">
    <div class="my-information">
        <div class="my-img">
            <img src="http://ooa3lxrpg.bkt.clouddn.com/b.jpg?imageView2/1/w/120/h/120/q/75" rel="图片">
            <a href="https://github.com/cspp01"></a>
        </div>
        <span>cc</span>
        <p>求知若饥 虚心若愚</p>
    </div>
    <p class="my-social">
        
            <a href="https://github.com/cspp01" class="my-social-me5">github</a>
        
            <a href="/" class="my-social-me2">twitter</a>
        
            <a href="http://weibo.com/5262373626/profile?topnav=1&wvr=6&is_all=1" class="my-social-me2">weibo</a>
        
            <a href="http://douban.com/people/160374034/" class="my-social-me2">豆瓣</a>
        
            <a href="http://www.zhihu.com/people/cc-chen-4-85" class="my-social-me1">知乎</a>
        
    </p>
    <div class="my-post">
        <a href="/archives">
            <strong>19</strong><br>
            <span>posts</span>
        </a>
        <a href="/categories">
            <strong>11</strong><br>
            <span>categories</span>
        </a>
        <a href="/tags">
            <strong>21</strong><br>
            <span>tags</span>
        </a>
    </div>
    <div class="search-rss">
        <div class="my-search">
            <a href="javascript:void(0)" id ='my-search-a' class="popup-trigger">search</a>
        </div>
        
            <div class="my-rss">
                <a href="/atom.xml">rss</a>
            </div>
        
    </div>
    <div class="my-links">
        <ul class="clearfix">
            
            <li>
                <a href="/">
                    <img src="http://ooa3lxrpg.bkt.clouddn.com/timg.jpg">
                    <p>ccblog</p>
                </a>
            </li>
            
            <li>
                <a href="/">
                    <img src="http://ooa3lxrpg.bkt.clouddn.com/timg%20%282%29.jpg">
                    <p>boc</p>
                </a>
            </li>
            
            <li>
                <a href="/">
                    <img src="http://ooa3lxrpg.bkt.clouddn.com/timg%20%283%29.jpg">
                    <p>haha</p>
                </a>
            </li>
            
            <li>
                <a href="/">
                    <img src="http://ooa3lxrpg.bkt.clouddn.com/timg%20%283%29.jpg">
                    <p>pp</p>
                </a>
            </li>
            
            <li>
                <a href="/">
                    <img src="http://ooa3lxrpg.bkt.clouddn.com/timg%20%281%29.jpg">
                    <p>oop</p>
                </a>
            </li>
            
        </ul>
    </div>
    <div class="hot-page">
        
    </div>
</div>
            
            <div id="warehouse"></div>
            
        </section>
    </div>
    <footer id="footer">
    <p>© 2017  cc | <iframe src="https://ghbtns.com/github-btn.html?user=cspp01&repo=cspp01.github.io&type=star&count=true" >
        </iframe><br/>
        concise theme, this world is mine.  | cc'blog | Fork me on Github
        
            | <script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");document.write(unescape("%3Cspan id='cnzz_stat_icon_1261969111'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s19.cnzz.com/z_stat.php%3Fid%3D1261969111%26show%3Dpic' type='text/javascript'%3E%3C/script%3E"));</script>
        
    </p>
</footer>
</div>
<label for="left-information"></label>


    <div class="site-search">
        <div class="algolia-popup popup">
            <div class="algolia-search">
                <div class="algolia-search-input-icon">
                    <i class="fa fa-search"></i>
                </div>
                <div class="algolia-search-input" id="algolia-search-input"></div>
            </div>

            <div class="algolia-results">
                <div id="algolia-stats"></div>
                <div id="algolia-hits"></div>
                <div id="algolia-pagination" class="algolia-pagination"></div>
            </div>

            <span class="popup-btn-close">
          <i class="fa fa-times-circle"></i>
        </span>
        </div>
    </div>


<script src="https://cdn1.lncld.net/static/js/av-core-mini-0.6.1.js"></script>
<script>AV.initialize("rRxCAb8Kk2bhhTQJInFKaY4v-gzGzoHsz", "eEp5YWpvXhpv3Jvheh4bHCfG");</script>
<script>
    function showTime(test) {
        var query = new AV.Query(test);
        var entries = [];
        var $visitors = $(".leancloud_visitors");

        $visitors.each(function () {
            entries.push( $(this).attr("id").trim() );
        });

        query.containedIn('url', entries);
        query.find()
            .done(function (results) {
                var COUNT_CONTAINER_REF = '.leancloud-visitors-count';

                if (results.length === 0) {
                    $visitors.find(COUNT_CONTAINER_REF).text(0);
                    return;
                }

                for (var i = 0; i < results.length; i++) {
                    var item = results[i];
                    var url = item.get('url');
                    var time = item.get('time');
                    var element = document.getElementById(url);

                    $(element).find(COUNT_CONTAINER_REF).text(time);
                }
            })
            .fail(function (object, error) {
                console.log("Error: " + error.code + " " + error.message);
            });
    }

    function addCount(test) {
        var $visitors = $(".leancloud_visitors");
        var url = $visitors.attr('id').trim();
        var title = $visitors.attr('data-flag-title').trim();
        var query = new AV.Query(test);

        query.equalTo("url", url);
        query.find({
            success: function(results) {
                if (results.length > 0) {
                    var counter = results[0];
                    counter.fetchWhenSave(true);
                    counter.increment("time");
                    counter.save(null, {
                        success: function(counter) {
                            var $element = $(document.getElementById(url));
                            $element.find('.leancloud-visitors-count').text(counter.get('time'));
                        },
                        error: function(counter, error) {
                            console.log('Failed to save Visitor num, with error message: ' + error.message);
                        }
                    });
                } else {
                    var newcounter = new test();
                    /* Set ACL */
                    var acl = new AV.ACL();
                    acl.setPublicReadAccess(true);
                    acl.setPublicWriteAccess(true);
                    newcounter.setACL(acl);
                    /* End Set ACL */
                    newcounter.set("title", title);
                    newcounter.set("url", url);
                    newcounter.set("time", 1);
                    newcounter.save(null, {
                        success: function(newcounter) {
                            var $element = $(document.getElementById(url));
                            $element.find('.leancloud-visitors-count').text(newcounter.get('time'));
                        },
                        error: function(newcounter, error) {
                            console.log('Failed to create');
                        }
                    });
                }
            },
            error: function(error) {
                console.log('Error:' + error.code + " " + error.message);
            }
        });
    }

    $(function() {
        var test = AV.Object.extend("Counter");
        if ($('.leancloud_visitors').length == 1) {
            addCount(test);
        } else if ($('.leancloud_visitors').length > 1) {
            showTime(test);
        }
    });
</script>



<script>
    (function(){
        var bp = document.createElement('script');
        var curProtocol = window.location.protocol.split(':')[0];
        if (curProtocol === 'https') {
            bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
        }
        else {
            bp.src = 'http://push.zhanzhang.baidu.com/push.js';
        }
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(bp, s);
    })();
</script>

</body>

<script src="/js/getTitle.js"></script>
    <script>
        $(function(){
            var __warehouse=document.getElementById('warehouse');
            var __content=document.getElementById('post');
            var cus={
                'title':'none',
                'article':__content,
            };
            __warehouse.__newCc(cus);
        });
    </script>

</html>